using System;
using System.Collections.Generic;
using System.Text;
using System.IO;


namespace PocketLibrary
{
    public interface IBlog : IService
    {
        // properties
        int BlogId { get; set;}
        string BlogName { get; set; }
        string BlogUrl { get; set; }
        string ApiUrl { get; set;}
        string UserName { get; set; }
        string PassWord { get; set; }
        BlogType Type { get; }
        HelperBlogs[] UserBlogs { get; }
        bool MultiBlogsSupported { get; }

        // events
        event RequestProgressHandler OnRequestProgress;

        // methods
        void getUserBlogs();
        void getBlogCategories();
        string newPost(string title, string post, string publish);
        BlogPost[] getRecentPosts(int numPosts);
        string editPost(BlogPost edit);
        BlogPost getPost(string postid);
        Category getPostCategory(string postid);
        void setPostCategory(string postid, Category cat);
        string newMediaObject(string tiedostonimi, string tiedosto);
        void SelectBlog(HelperBlogs selection);
    }

    public class Category
    {
        public string CategoryId="categoryId";
        public string CategoryName="categoryName";

        public override string ToString()
        {
            return CategoryName;
        }
        public Category()
        {

        }

        public Category(string catName)
        {
            CategoryName = catName;
        }
    }

    public class HelperBlogs
    {
        public int blogId = -1;
        public string blogName = "";
        public string blogUrl = "";
        public string ServiceFeed = "";
        public string ServicePost = "";
        public string Alternate = "";

        public override string ToString()
        {
            return blogName;
        }
    }
}
